<include file="Public/min-header"/>
<div class="wrapper">
    <include file="Public/breadcrumb"/>
    <section class="content">
        <div class="row">
            <div class="col-xs-12">
                <div class="box">	    
                    <!-- /.box-header -->
                    <div class="box-body">	             
                        <div class="row">
                            <div class="col-sm-12">
                                <table id="list-table" class="table table-bordered table-striped dataTable" role="grid" aria-describedby="example1_info">
                                    <thead>
                                        <tr role="row">
                                            <th>序号</th>
                                            <th>等级名称</th>
                                            <th>报单金额</th>
                                            <!--<th>折扣率</th>-->
                                            <th>分享积分</th>
                                            <!-- <th>重消奖</th>  -->
                                            <th>本店管理服务费</th>
                                            <th>品牌店管理服务费</th>
                                            <th>分店管理服务费</th>
                                           <th>店补</th>
                                           <th>提现</th>
                                            <th>操作</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                    <foreach name="list" item="vo" key="k" >
                                        <tr role="row" align="center">
                                            <td>{$vo.level_id}</td>
                                            <td>{$vo.level_name}</td><!--等级名称-->
                                            <td>{$vo.amount}</td><!--报单金额-->
                                            <!--<td>{$vo.discount}%</td>折扣率-->
                                            <td>{$vo.price1_per}</td><!--分享积分-->
                                          <!-- <td>{$vo.price2_per}</td>重消奖 -->
                                            <td>{$vo.price3_per}</td><!--本店管理服务费-->		                     
                                            <td>{$vo.price4_per}</td><!--品牌店管理服务费-->     
                                            <td>{$vo.price5_per}</td><!--分店管理服务费-->
                                             <td>{$vo.price6_per}</td>
                                           <td class="text-left">
                    <img width="20" height="20" src="__PUBLIC__/images/<if condition='$vo[is_tixian] eq 1'>yes.png<else />cancel.png</if>" onclick="changeTableVal('user_level', 'level_id', '{$vo.level_id}', 'is_tixian', this)"/>
                </td>
                                            <td>
                                                <a class="btn btn-primary" href="{:U('User/level',array('act'=>'edit','level_id'=>$vo['level_id']))}"><i class="fa fa-pencil"></i></a>
                                                <a class="btn btn-danger" href="javascript:void(0)" data-url="{:U('User/levelHandle')}" data-id="{$vo.level_id}" onclick="delfun(this)"><i class="fa fa-trash-o"></i></a>
                                            </td>
                                        </tr>
                                    </foreach>
                                    </tbody>
                                    <tfoot>

                                    </tfoot>
                                </table>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-sm-6 text-left"></div>
                            <div class="col-sm-6 text-right">{$page}</div>		
                        </div>
                    </div><!-- /.box-body -->
                </div><!-- /.box -->
            </div>
        </div>
    </section>
</div>
<script>
    function delfun(obj) {
        if (confirm('确认删除')) {
            $.ajax({
                type: 'post',
                url: $(obj).attr('data-url'),
                data: {act: 'del', level_id: $(obj).attr('data-id')},
                dataType: 'json',
                success: function (data) {
                    if (data) {
                        $(obj).parent().parent().remove();
                    } else {
                        layer.alert('删除失败', {icon: 2});  //alert('删除失败');
                    }
                }
            })
        }
        return false;
    }
</script>  
</body>
</html>